package com.jackrain.nea.shiro.stateless;

import org.apache.shiro.authc.AuthenticationInfo;
import org.apache.shiro.authc.AuthenticationToken;
import org.apache.shiro.authc.credential.SimpleCredentialsMatcher;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Created by Lucky dog on 2016/7/26.
 */
public class StatelessCredentialsMatcher extends SimpleCredentialsMatcher {

    private static Logger logger= LoggerFactory.getLogger(StatelessCredentialsMatcher.class.getName());


    @Override
    public boolean doCredentialsMatch(AuthenticationToken token, AuthenticationInfo info) {
        return token.getCredentials().equals(info.getCredentials());
    }

}
